{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 备注\n",
    "> 1. 城市：'全国'、 '北京、 '上海'、 '天津'、 '重庆'、 '广州'、'深圳'、 '苏州'、 '南京'、 '杭州'、 '大连'、'成都'、 '武汉'、 '西安'\n",
    "> 2. 关键词：不限制\n",
    "> 3. 工作经验：'应届生'、 '实习生'、 '1年以内'、 '1-3年'、'3-5年'、 '5-10年'、'10年以上'\n",
    "> 4. 公司规模：1-49人、50-99人、100-499人、500-999人、1000-2000人、2000-5000人、5000-10000人、10000人以上"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting requests-html"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "ERROR: pyppeteer 1.0.2 has requirement certifi>=2021, but you'll have certifi 2020.6.20 which is incompatible.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "  Downloading requests_html-0.10.0-py3-none-any.whl (13 kB)\n",
      "Collecting bs4\n",
      "  Downloading bs4-0.0.1.tar.gz (1.1 kB)\n",
      "Collecting w3lib\n",
      "  Downloading w3lib-2.1.2-py3-none-any.whl (21 kB)\n",
      "Collecting parse\n",
      "  Downloading parse-1.19.1-py2.py3-none-any.whl (18 kB)\n",
      "Requirement already satisfied: requests in c:\\program files\\anaconda3\\lib\\site-packages (from requests-html) (2.24.0)\n",
      "Collecting fake-useragent\n",
      "  Downloading fake_useragent-1.3.0-py3-none-any.whl (15 kB)\n",
      "Collecting pyquery\n",
      "  Downloading pyquery-2.0.0-py3-none-any.whl (22 kB)\n",
      "Collecting pyppeteer>=0.0.14\n",
      "  Downloading pyppeteer-1.0.2-py3-none-any.whl (83 kB)\n",
      "Requirement already satisfied: beautifulsoup4 in c:\\program files\\anaconda3\\lib\\site-packages (from bs4->requests-html) (4.9.1)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\program files\\anaconda3\\lib\\site-packages (from requests->requests-html) (2020.6.20)\n",
      "Requirement already satisfied: idna<3,>=2.5 in c:\\program files\\anaconda3\\lib\\site-packages (from requests->requests-html) (2.10)\n",
      "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\\program files\\anaconda3\\lib\\site-packages (from requests->requests-html) (1.25.9)\n",
      "Requirement already satisfied: chardet<4,>=3.0.2 in c:\\program files\\anaconda3\\lib\\site-packages (from requests->requests-html) (3.0.4)\n",
      "Collecting importlib-resources>=5.0; python_version < \"3.10\"\n",
      "  Downloading importlib_resources-6.1.1-py3-none-any.whl (33 kB)\n",
      "Collecting cssselect>=1.2.0\n",
      "  Downloading cssselect-1.2.0-py2.py3-none-any.whl (18 kB)\n",
      "Requirement already satisfied: lxml>=2.1 in c:\\program files\\anaconda3\\lib\\site-packages (from pyquery->requests-html) (4.5.2)\n",
      "Collecting appdirs<2.0.0,>=1.4.3\n",
      "  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)\n",
      "Collecting websockets<11.0,>=10.0\n",
      "  Downloading websockets-10.4-cp38-cp38-win_amd64.whl (101 kB)\n",
      "Requirement already satisfied: tqdm<5.0.0,>=4.42.1 in c:\\program files\\anaconda3\\lib\\site-packages (from pyppeteer>=0.0.14->requests-html) (4.47.0)\n",
      "Collecting pyee<9.0.0,>=8.1.0\n",
      "  Downloading pyee-8.2.2-py2.py3-none-any.whl (12 kB)\n",
      "Requirement already satisfied: importlib-metadata>=1.4 in c:\\program files\\anaconda3\\lib\\site-packages (from pyppeteer>=0.0.14->requests-html) (1.7.0)\n",
      "Requirement already satisfied: soupsieve>1.2 in c:\\program files\\anaconda3\\lib\\site-packages (from beautifulsoup4->bs4->requests-html) (2.0.1)\n",
      "Requirement already satisfied: zipp>=3.1.0; python_version < \"3.10\" in c:\\program files\\anaconda3\\lib\\site-packages (from importlib-resources>=5.0; python_version < \"3.10\"->fake-useragent->requests-html) (3.1.0)\n",
      "Building wheels for collected packages: bs4\n",
      "  Building wheel for bs4 (setup.py): started\n",
      "  Building wheel for bs4 (setup.py): finished with status 'done'\n",
      "  Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1279 sha256=2ce14422724470c174c04b6dca3eab781cc8b5babd20b932c0b761701e7c660c\n",
      "  Stored in directory: c:\\users\\3sxl_20600\\appdata\\local\\pip\\cache\\wheels\\75\\78\\21\\68b124549c9bdc94f822c02fb9aa3578a669843f9767776bca\n",
      "Successfully built bs4\n",
      "Installing collected packages: bs4, w3lib, parse, importlib-resources, fake-useragent, cssselect, pyquery, appdirs, websockets, pyee, pyppeteer, requests-html\n",
      "Successfully installed appdirs-1.4.4 bs4-0.0.1 cssselect-1.2.0 fake-useragent-1.3.0 importlib-resources-6.1.1 parse-1.19.1 pyee-8.2.2 pyppeteer-1.0.2 pyquery-2.0.0 requests-html-0.10.0 w3lib-2.1.2 websockets-10.4\n"
     ]
    }
   ],
   "source": [
    "!pip install requests-html\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "登录cookie XSRF-TOKEN=zIARnRM0QQaLudJk_4OBXw; __gc_id=e936feed5bd343e5a73b304fa0d4ad5f; _ga=GA1.1.504776059.1697021947; __uuid=1697021948310.51; __tlog=1697021948354.48%7C00000000%7C00000000%7C00000000%7C00000000; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1697021951; acw_tc=2760828416970219810274366e53a098388abcfc886c89f5cbf2332344893f; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1697021975; __session_seq=4; __uv_seq=4; __tlg_event_seq=24; _ga_54YTJKWN86=GS1.1.1697021946.1.1.1697023027.0.0.0\n",
      "这是第1页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第2页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第3页，接下来将先等待9秒...然后以继续抓取\n",
      "这是第4页，接下来将先等待9秒...然后以继续抓取\n",
      "这是第5页，接下来将先等待7秒...然后以继续抓取\n",
      "这是第6页，接下来将先等待3秒...然后以继续抓取\n",
      "这是第7页，接下来将先等待6秒...然后以继续抓取\n",
      "这是第8页，接下来将先等待6秒...然后以继续抓取\n",
      "这是第9页，接下来将先等待8秒...然后以继续抓取\n",
      "这是第10页，接下来将先等待7秒...然后以继续抓取\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dataParams</th>\n",
       "      <th>dataInfo</th>\n",
       "      <th>job.labels</th>\n",
       "      <th>job.title</th>\n",
       "      <th>job.dq</th>\n",
       "      <th>job.jobKind</th>\n",
       "      <th>job.refreshTime</th>\n",
       "      <th>job.jobId</th>\n",
       "      <th>job.advViewFlag</th>\n",
       "      <th>job.requireWorkYears</th>\n",
       "      <th>...</th>\n",
       "      <th>recruiter.recruiterTitle</th>\n",
       "      <th>recruiter.recruiterId</th>\n",
       "      <th>recruiter.recruiterPhoto</th>\n",
       "      <th>comp.compId</th>\n",
       "      <th>comp.compName</th>\n",
       "      <th>comp.compScale</th>\n",
       "      <th>comp.compStage</th>\n",
       "      <th>comp.compLogo</th>\n",
       "      <th>comp.compIndustry</th>\n",
       "      <th>comp.link</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>{\"imId\":\"fd14de11be220755ac365a663ca833da\",\"im...</td>\n",
       "      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n",
       "      <td>[渠道运营, 产品运营]</td>\n",
       "      <td>PM产品经理（元器件）</td>\n",
       "      <td>深圳-福田区</td>\n",
       "      <td>2</td>\n",
       "      <td>20220411230440</td>\n",
       "      <td>48818805</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>总经理</td>\n",
       "      <td>09ea96f81e58eafe6ac4e705fd2725a1</td>\n",
       "      <td>5f8f986bdfb13a7dee342f2108u.jpg</td>\n",
       "      <td>9885213</td>\n",
       "      <td>厦门唯样科技有限公司</td>\n",
       "      <td>50-99人</td>\n",
       "      <td>融资未公开</td>\n",
       "      <td>5c6e1794261c45f047888e8e04u.png</td>\n",
       "      <td>电子/半导体/集成电路</td>\n",
       "      <td>https://www.liepin.com/company/9885213/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>{\"imId\":\"735936693af29097a9f0273dd33fa30b\",\"im...</td>\n",
       "      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n",
       "      <td>[]</td>\n",
       "      <td>TV Product Manager(南非、意大利)</td>\n",
       "      <td>深圳</td>\n",
       "      <td>2</td>\n",
       "      <td>20230831194617</td>\n",
       "      <td>61288827</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>招聘经理</td>\n",
       "      <td>4898c453f67450440d4d8cf16bd118f5</td>\n",
       "      <td>5f8f9863f6d1ab58476f246a08u.jpg</td>\n",
       "      <td>1550812</td>\n",
       "      <td>创维-RGB电子</td>\n",
       "      <td>10000人以上</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5bfe96db74719df0ac991c0e03a.png</td>\n",
       "      <td>电子/半导体/集成电路</td>\n",
       "      <td>https://www.liepin.com/company/1550812/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>{\"imId\":\"be61c56b006b75c8fda65984f5cddb33\",\"im...</td>\n",
       "      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n",
       "      <td>[工具产品, 数据产品, 策略产品, 用户研究, 团队管理, 数据分析, 需求分析, 竞品分...</td>\n",
       "      <td>产品经理实习生</td>\n",
       "      <td>深圳-龙华区</td>\n",
       "      <td>2</td>\n",
       "      <td>20230605144027</td>\n",
       "      <td>59083047</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>HR</td>\n",
       "      <td>975590973597d5990df38e310c892c5e</td>\n",
       "      <td>6482ad4ca582421b523f6aad02u.png</td>\n",
       "      <td>8809483</td>\n",
       "      <td>深圳汉阳科技有限公司</td>\n",
       "      <td>50-99人</td>\n",
       "      <td>天使轮</td>\n",
       "      <td>638030fd790f213180984f4401u.png</td>\n",
       "      <td>人工智能</td>\n",
       "      <td>https://www.liepin.com/company/8809483/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>{\"imId\":\"174228587afe7e1221763eed48c5bc0c\",\"im...</td>\n",
       "      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n",
       "      <td>[策略产品, 产品优化, 团队管理, 用户研究, 数据分析]</td>\n",
       "      <td>AIGC 企业级应用的产品经理</td>\n",
       "      <td>深圳-宝安区</td>\n",
       "      <td>2</td>\n",
       "      <td>20230722084816</td>\n",
       "      <td>60207589</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>创始人</td>\n",
       "      <td>b9f5503a38d756eea51fcf4dc008bfd3</td>\n",
       "      <td>644ed8b14bbdfd19cd96b38d07u.png</td>\n",
       "      <td>13341083</td>\n",
       "      <td>深圳市迷谷启明科技有限公司</td>\n",
       "      <td>1-49人</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61b07937d0458d53c627567e02u.jpg</td>\n",
       "      <td>互联网</td>\n",
       "      <td>https://www.liepin.com/company/13341083/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>{\"imId\":\"d29f8cb988e6cb6ec68319df6cd38213\",\"im...</td>\n",
       "      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n",
       "      <td>[策略产品, to G, 竞品分析, 产品规划, 用户研究, 产品设计, 数据分析, 团队管理]</td>\n",
       "      <td>产品经理-德语</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>2</td>\n",
       "      <td>20221114134406</td>\n",
       "      <td>53884129</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>HRBP</td>\n",
       "      <td>1ea5a9e8f72f55d8b9b943c2bbffc50b</td>\n",
       "      <td>636b0ca57f270e6a8bfd39c301u.png</td>\n",
       "      <td>9998763</td>\n",
       "      <td>广州疆海科技有限公司</td>\n",
       "      <td>100-499人</td>\n",
       "      <td>A轮</td>\n",
       "      <td>648a8cab5446774f442f54e103u.png</td>\n",
       "      <td>电子/半导体/集成电路</td>\n",
       "      <td>https://www.liepin.com/company/9998763/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>{\"jobId\":\"33273225\",\"recruiterName\":\"陈先生\",\"imI...</td>\n",
       "      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n",
       "      <td>[生产跟单]</td>\n",
       "      <td>生产跟单</td>\n",
       "      <td>深圳</td>\n",
       "      <td>2</td>\n",
       "      <td>20201107085717</td>\n",
       "      <td>33273225</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>总经理</td>\n",
       "      <td>0895e5f5ea2f23c73d9184460a4c74d3</td>\n",
       "      <td>5f8f98698dbe6273dcf8516008u.jpg</td>\n",
       "      <td>12443347</td>\n",
       "      <td>深圳市诚伟翔科技有限公司</td>\n",
       "      <td>1-49人</td>\n",
       "      <td>NaN</td>\n",
       "      <td>61b07937d0458d53c627567e02u.jpg</td>\n",
       "      <td>金属制品</td>\n",
       "      <td>https://www.liepin.com/company/12443347/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>{\"jobId\":\"47789029\",\"recruiterName\":\"罗女士\",\"imI...</td>\n",
       "      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n",
       "      <td>[]</td>\n",
       "      <td>管理培训生</td>\n",
       "      <td>深圳</td>\n",
       "      <td>2</td>\n",
       "      <td>20220701093709</td>\n",
       "      <td>47789029</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>人事主管</td>\n",
       "      <td>0cb8121bf5405885d431a8234a355eca</td>\n",
       "      <td>6225a01d81a14b00fe47233b03u.png</td>\n",
       "      <td>9238896</td>\n",
       "      <td>大管加</td>\n",
       "      <td>100-499人</td>\n",
       "      <td>天使轮</td>\n",
       "      <td>5e3d1aa96324626e179ace0101u.jpg</td>\n",
       "      <td>计算机软件</td>\n",
       "      <td>https://www.liepin.com/company/9238896/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>{\"jobId\":\"47139309\",\"recruiterName\":\"汪女士\",\"imI...</td>\n",
       "      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n",
       "      <td>[网络销售, 电话销售, to C, 销售管理, 客户管理, 团队管理]</td>\n",
       "      <td>网络销售</td>\n",
       "      <td>深圳-龙岗区</td>\n",
       "      <td>2</td>\n",
       "      <td>20220216173703</td>\n",
       "      <td>47139309</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>销售总监</td>\n",
       "      <td>88570e71c3ade619b3047ceb4c876b7b</td>\n",
       "      <td>622f36db4a223b009c6c4efe05u.png</td>\n",
       "      <td>10074973</td>\n",
       "      <td>深圳市洋葱电子商务有限公司</td>\n",
       "      <td>500-999人</td>\n",
       "      <td>B轮</td>\n",
       "      <td>5e23ab5629d83a675442873a06u.png</td>\n",
       "      <td>互联网</td>\n",
       "      <td>https://www.liepin.com/company/10074973/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>{\"jobId\":\"23174441\",\"recruiterName\":\"付先生\",\"imI...</td>\n",
       "      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n",
       "      <td>[]</td>\n",
       "      <td>产品专员/助理</td>\n",
       "      <td>深圳-龙岗区</td>\n",
       "      <td>2</td>\n",
       "      <td>20191012125151</td>\n",
       "      <td>23174441</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>经理</td>\n",
       "      <td>5527f903ad0f2f1a319538072cd912fa</td>\n",
       "      <td>5f8f986aea60860b75384fab08u.jpg</td>\n",
       "      <td>7891695</td>\n",
       "      <td>深圳时资科技发展有限公司</td>\n",
       "      <td>1-49人</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5bfe9f9f74719d2aa34bce5e03a.png</td>\n",
       "      <td>电气机械/器材</td>\n",
       "      <td>https://www.liepin.com/company/7891695/</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>{\"jobId\":\"49947443\",\"recruiterName\":\"童女士\",\"imI...</td>\n",
       "      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n",
       "      <td>[销售助理]</td>\n",
       "      <td>销售助理</td>\n",
       "      <td>深圳-龙岗区</td>\n",
       "      <td>2</td>\n",
       "      <td>20220817085500</td>\n",
       "      <td>49947443</td>\n",
       "      <td>False</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>...</td>\n",
       "      <td>人事</td>\n",
       "      <td>7ea036c02a53ddf1deeca2a9ecc4662b</td>\n",
       "      <td>5f8f9865ea60860b75384fa508u.jpg</td>\n",
       "      <td>13225483</td>\n",
       "      <td>深圳市欣妍生物技术有限公司</td>\n",
       "      <td>1-49人</td>\n",
       "      <td>融资未公开</td>\n",
       "      <td>61b07937d0458d53c627567e02u.jpg</td>\n",
       "      <td>制药</td>\n",
       "      <td>https://www.liepin.com/company/13225483/</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>400 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                           dataParams  \\\n",
       "0   {\"imId\":\"fd14de11be220755ac365a663ca833da\",\"im...   \n",
       "1   {\"imId\":\"735936693af29097a9f0273dd33fa30b\",\"im...   \n",
       "2   {\"imId\":\"be61c56b006b75c8fda65984f5cddb33\",\"im...   \n",
       "3   {\"imId\":\"174228587afe7e1221763eed48c5bc0c\",\"im...   \n",
       "4   {\"imId\":\"d29f8cb988e6cb6ec68319df6cd38213\",\"im...   \n",
       "..                                                ...   \n",
       "35  {\"jobId\":\"33273225\",\"recruiterName\":\"陈先生\",\"imI...   \n",
       "36  {\"jobId\":\"47789029\",\"recruiterName\":\"罗女士\",\"imI...   \n",
       "37  {\"jobId\":\"47139309\",\"recruiterName\":\"汪女士\",\"imI...   \n",
       "38  {\"jobId\":\"23174441\",\"recruiterName\":\"付先生\",\"imI...   \n",
       "39  {\"jobId\":\"49947443\",\"recruiterName\":\"童女士\",\"imI...   \n",
       "\n",
       "                                             dataInfo  \\\n",
       "0   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n",
       "1   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n",
       "2   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n",
       "3   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n",
       "4   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n",
       "..                                                ...   \n",
       "35  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n",
       "36  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n",
       "37  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n",
       "38  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n",
       "39  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n",
       "\n",
       "                                           job.labels  \\\n",
       "0                                        [渠道运营, 产品运营]   \n",
       "1                                                  []   \n",
       "2   [工具产品, 数据产品, 策略产品, 用户研究, 团队管理, 数据分析, 需求分析, 竞品分...   \n",
       "3                      [策略产品, 产品优化, 团队管理, 用户研究, 数据分析]   \n",
       "4    [策略产品, to G, 竞品分析, 产品规划, 用户研究, 产品设计, 数据分析, 团队管理]   \n",
       "..                                                ...   \n",
       "35                                             [生产跟单]   \n",
       "36                                                 []   \n",
       "37               [网络销售, 电话销售, to C, 销售管理, 客户管理, 团队管理]   \n",
       "38                                                 []   \n",
       "39                                             [销售助理]   \n",
       "\n",
       "                     job.title  job.dq job.jobKind job.refreshTime job.jobId  \\\n",
       "0                  PM产品经理（元器件）  深圳-福田区           2  20220411230440  48818805   \n",
       "1   TV Product Manager(南非、意大利)      深圳           2  20230831194617  61288827   \n",
       "2                      产品经理实习生  深圳-龙华区           2  20230605144027  59083047   \n",
       "3              AIGC 企业级应用的产品经理  深圳-宝安区           2  20230722084816  60207589   \n",
       "4                      产品经理-德语  深圳-南山区           2  20221114134406  53884129   \n",
       "..                         ...     ...         ...             ...       ...   \n",
       "35                        生产跟单      深圳           2  20201107085717  33273225   \n",
       "36                       管理培训生      深圳           2  20220701093709  47789029   \n",
       "37                        网络销售  深圳-龙岗区           2  20220216173703  47139309   \n",
       "38                     产品专员/助理  深圳-龙岗区           2  20191012125151  23174441   \n",
       "39                        销售助理  深圳-龙岗区           2  20220817085500  49947443   \n",
       "\n",
       "    job.advViewFlag job.requireWorkYears  ... recruiter.recruiterTitle  \\\n",
       "0             False                 经验不限  ...                      总经理   \n",
       "1             False                 经验不限  ...                     招聘经理   \n",
       "2             False                 经验不限  ...                       HR   \n",
       "3             False                 经验不限  ...                      创始人   \n",
       "4             False                 经验不限  ...                     HRBP   \n",
       "..              ...                  ...  ...                      ...   \n",
       "35            False                 经验不限  ...                      总经理   \n",
       "36            False                 经验不限  ...                     人事主管   \n",
       "37            False                 经验不限  ...                     销售总监   \n",
       "38            False                 经验不限  ...                       经理   \n",
       "39            False                 经验不限  ...                       人事   \n",
       "\n",
       "               recruiter.recruiterId         recruiter.recruiterPhoto  \\\n",
       "0   09ea96f81e58eafe6ac4e705fd2725a1  5f8f986bdfb13a7dee342f2108u.jpg   \n",
       "1   4898c453f67450440d4d8cf16bd118f5  5f8f9863f6d1ab58476f246a08u.jpg   \n",
       "2   975590973597d5990df38e310c892c5e  6482ad4ca582421b523f6aad02u.png   \n",
       "3   b9f5503a38d756eea51fcf4dc008bfd3  644ed8b14bbdfd19cd96b38d07u.png   \n",
       "4   1ea5a9e8f72f55d8b9b943c2bbffc50b  636b0ca57f270e6a8bfd39c301u.png   \n",
       "..                               ...                              ...   \n",
       "35  0895e5f5ea2f23c73d9184460a4c74d3  5f8f98698dbe6273dcf8516008u.jpg   \n",
       "36  0cb8121bf5405885d431a8234a355eca  6225a01d81a14b00fe47233b03u.png   \n",
       "37  88570e71c3ade619b3047ceb4c876b7b  622f36db4a223b009c6c4efe05u.png   \n",
       "38  5527f903ad0f2f1a319538072cd912fa  5f8f986aea60860b75384fab08u.jpg   \n",
       "39  7ea036c02a53ddf1deeca2a9ecc4662b  5f8f9865ea60860b75384fa508u.jpg   \n",
       "\n",
       "   comp.compId  comp.compName comp.compScale comp.compStage  \\\n",
       "0      9885213     厦门唯样科技有限公司         50-99人          融资未公开   \n",
       "1      1550812       创维-RGB电子       10000人以上            NaN   \n",
       "2      8809483     深圳汉阳科技有限公司         50-99人            天使轮   \n",
       "3     13341083  深圳市迷谷启明科技有限公司          1-49人            NaN   \n",
       "4      9998763     广州疆海科技有限公司       100-499人             A轮   \n",
       "..         ...            ...            ...            ...   \n",
       "35    12443347   深圳市诚伟翔科技有限公司          1-49人            NaN   \n",
       "36     9238896            大管加       100-499人            天使轮   \n",
       "37    10074973  深圳市洋葱电子商务有限公司       500-999人             B轮   \n",
       "38     7891695   深圳时资科技发展有限公司          1-49人            NaN   \n",
       "39    13225483  深圳市欣妍生物技术有限公司          1-49人          融资未公开   \n",
       "\n",
       "                      comp.compLogo comp.compIndustry  \\\n",
       "0   5c6e1794261c45f047888e8e04u.png       电子/半导体/集成电路   \n",
       "1   5bfe96db74719df0ac991c0e03a.png       电子/半导体/集成电路   \n",
       "2   638030fd790f213180984f4401u.png              人工智能   \n",
       "3   61b07937d0458d53c627567e02u.jpg               互联网   \n",
       "4   648a8cab5446774f442f54e103u.png       电子/半导体/集成电路   \n",
       "..                              ...               ...   \n",
       "35  61b07937d0458d53c627567e02u.jpg              金属制品   \n",
       "36  5e3d1aa96324626e179ace0101u.jpg             计算机软件   \n",
       "37  5e23ab5629d83a675442873a06u.png               互联网   \n",
       "38  5bfe9f9f74719d2aa34bce5e03a.png           电气机械/器材   \n",
       "39  61b07937d0458d53c627567e02u.jpg                制药   \n",
       "\n",
       "                                   comp.link  \n",
       "0    https://www.liepin.com/company/9885213/  \n",
       "1    https://www.liepin.com/company/1550812/  \n",
       "2    https://www.liepin.com/company/8809483/  \n",
       "3   https://www.liepin.com/company/13341083/  \n",
       "4    https://www.liepin.com/company/9998763/  \n",
       "..                                       ...  \n",
       "35  https://www.liepin.com/company/12443347/  \n",
       "36   https://www.liepin.com/company/9238896/  \n",
       "37  https://www.liepin.com/company/10074973/  \n",
       "38   https://www.liepin.com/company/7891695/  \n",
       "39  https://www.liepin.com/company/13225483/  \n",
       "\n",
       "[400 rows x 31 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 猎聘 没有设置登陆cookie，仅可抓取10页\n",
    "import crawl_liepin\n",
    "\n",
    "crawl_liepin.crawl(城市=\"深圳\",关键词=\"产品经理\",工作经验='应届生')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. 第一个目标，cookies实现登陆，获取完整数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'inited_user=daf7251f92024e8969feb28b0e9ad34c; XSRF-TOKEN=SIVa3Y_gRaqR7k-mI1I6kQ; __gc_id=d474cd1529ae40a29b8f9c81b7e60de7; _ga=GA1.1.1301373590.1698838360; __uuid=1698838362686.73; __tlog=1698838362732.34%7C00000000%7C00000000%7C00000000%7C00000000; acw_tc=276077be16988383924452585e8d8e297846bb9fcc8c8f34695b420d154b08; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1698838365; UniqueKey=95507c72a8d5ae141a667e00ad0d9493; liepin_login_valid=0; lt_auth=u%2B5bbHQGxlzxtXfR3zQN4vociI39UWvIpX8EhE0Ahoe%2BCqG04PngSwOGq7EExAMhlkh1ccULN7n2Pev2zXtP4kcTwGqnl4CyvOW92GECTeNcN8W2vezHl8zRQpQcl0AC8nFbtkIL%2BQ%3D%3D; access_system=C; user_roles=0; user_photo=5f8fa3a679c7cc70efbf444e08u.png; user_name=%E8%AE%B8%E6%99%BA%E8%B6%85; need_bind_tel=false; new_user=false; c_flag=fa43f4d55f3df63a96a7b4f194e214d4; inited_user=daf7251f92024e8969feb28b0e9ad34c; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1698838461; imId=c5f9b89f8466dffe6882ca1e5431db9c; imId_0=c5f9b89f8466dffe6882ca1e5431db9c; imClientId=c5f9b89f8466dffeb1921abcfab3aed0; imClientId_0=c5f9b89f8466dffeb1921abcfab3aed0; imApp_0=1; __session_seq=7; __uv_seq=7; fe_im_socketSequence_new_0=1_1_1; __tlg_event_seq=116; fe_im_opened_pages=; fe_im_connectJson_0=%7B%220_95507c72a8d5ae141a667e00ad0d9493%22%3A%7B%22socketConnect%22%3A%222%22%2C%22connectDomain%22%3A%22liepin.com%22%7D%7D; _ga_54YTJKWN86=GS1.1.1698838360.1.1.1698838528.0.0.0'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 建立登陆cookie\n",
    "cookie = \"inited_user=daf7251f92024e8969feb28b0e9ad34c; XSRF-TOKEN=SIVa3Y_gRaqR7k-mI1I6kQ; __gc_id=d474cd1529ae40a29b8f9c81b7e60de7; _ga=GA1.1.1301373590.1698838360; __uuid=1698838362686.73; __tlog=1698838362732.34%7C00000000%7C00000000%7C00000000%7C00000000; acw_tc=276077be16988383924452585e8d8e297846bb9fcc8c8f34695b420d154b08; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1698838365; UniqueKey=95507c72a8d5ae141a667e00ad0d9493; liepin_login_valid=0; lt_auth=u%2B5bbHQGxlzxtXfR3zQN4vociI39UWvIpX8EhE0Ahoe%2BCqG04PngSwOGq7EExAMhlkh1ccULN7n2Pev2zXtP4kcTwGqnl4CyvOW92GECTeNcN8W2vezHl8zRQpQcl0AC8nFbtkIL%2BQ%3D%3D; access_system=C; user_roles=0; user_photo=5f8fa3a679c7cc70efbf444e08u.png; user_name=%E8%AE%B8%E6%99%BA%E8%B6%85; need_bind_tel=false; new_user=false; c_flag=fa43f4d55f3df63a96a7b4f194e214d4; inited_user=daf7251f92024e8969feb28b0e9ad34c; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1698838461; imId=c5f9b89f8466dffe6882ca1e5431db9c; imId_0=c5f9b89f8466dffe6882ca1e5431db9c; imClientId=c5f9b89f8466dffeb1921abcfab3aed0; imClientId_0=c5f9b89f8466dffeb1921abcfab3aed0; imApp_0=1; __session_seq=7; __uv_seq=7; fe_im_socketSequence_new_0=1_1_1; __tlg_event_seq=116; fe_im_opened_pages=; fe_im_connectJson_0=%7B%220_95507c72a8d5ae141a667e00ad0d9493%22%3A%7B%22socketConnect%22%3A%222%22%2C%22connectDomain%22%3A%22liepin.com%22%7D%7D; _ga_54YTJKWN86=GS1.1.1698838360.1.1.1698838528.0.0.0\"\n",
    "cookie"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "登录cookie inited_user=daf7251f92024e8969feb28b0e9ad34c; XSRF-TOKEN=SIVa3Y_gRaqR7k-mI1I6kQ; __gc_id=d474cd1529ae40a29b8f9c81b7e60de7; _ga=GA1.1.1301373590.1698838360; __uuid=1698838362686.73; __tlog=1698838362732.34%7C00000000%7C00000000%7C00000000%7C00000000; acw_tc=276077be16988383924452585e8d8e297846bb9fcc8c8f34695b420d154b08; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1698838365; UniqueKey=95507c72a8d5ae141a667e00ad0d9493; liepin_login_valid=0; lt_auth=u%2B5bbHQGxlzxtXfR3zQN4vociI39UWvIpX8EhE0Ahoe%2BCqG04PngSwOGq7EExAMhlkh1ccULN7n2Pev2zXtP4kcTwGqnl4CyvOW92GECTeNcN8W2vezHl8zRQpQcl0AC8nFbtkIL%2BQ%3D%3D; access_system=C; user_roles=0; user_photo=5f8fa3a679c7cc70efbf444e08u.png; user_name=%E8%AE%B8%E6%99%BA%E8%B6%85; need_bind_tel=false; new_user=false; c_flag=fa43f4d55f3df63a96a7b4f194e214d4; inited_user=daf7251f92024e8969feb28b0e9ad34c; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1698838461; imId=c5f9b89f8466dffe6882ca1e5431db9c; imId_0=c5f9b89f8466dffe6882ca1e5431db9c; imClientId=c5f9b89f8466dffeb1921abcfab3aed0; imClientId_0=c5f9b89f8466dffeb1921abcfab3aed0; imApp_0=1; __session_seq=7; __uv_seq=7; fe_im_socketSequence_new_0=1_1_1; __tlg_event_seq=116; fe_im_opened_pages=; fe_im_connectJson_0=%7B%220_95507c72a8d5ae141a667e00ad0d9493%22%3A%7B%22socketConnect%22%3A%222%22%2C%22connectDomain%22%3A%22liepin.com%22%7D%7D; _ga_54YTJKWN86=GS1.1.1698838360.1.1.1698838528.0.0.0\n",
      "这是第1页，接下来将先等待9秒...然后以继续抓取\n",
      "这是第2页，接下来将先等待10秒...然后以继续抓取\n",
      "这是第3页，接下来将先等待8秒...然后以继续抓取\n",
      "这是第4页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第5页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第6页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第7页，接下来将先等待6秒...然后以继续抓取\n",
      "这是第8页，接下来将先等待10秒...然后以继续抓取\n",
      "这是第9页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第10页，接下来将先等待5秒...然后以继续抓取\n"
     ]
    }
   ],
   "source": [
    "import crawl_liepin\n",
    "\n",
    "产品经理_深圳_results = crawl_liepin.crawl(城市=\"深圳\",关键词=\"产品经理\",工作经验='',登录cookie=cookie)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2. 尝试使用数据分析进行数据交互式可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<bound method DataFrame.to_html of                                            dataParams  \\\n",
       "0   {\"jobKind\":\"2\",\"imId\":\"7d3fa6789cde5a1567766a0...   \n",
       "1   {\"jobKind\":\"2\",\"imId\":\"3a4d6e5af4ea54c998d2351...   \n",
       "2   {\"jobKind\":\"2\",\"imId\":\"ca94f48529c69593cf3b784...   \n",
       "3   {\"jobKind\":\"2\",\"imId\":\"4a4ece35206ffdf578f5885...   \n",
       "4   {\"jobKind\":\"2\",\"imId\":\"5f8386ced4ae183262f6540...   \n",
       "..                                                ...   \n",
       "35  {\"jobKind\":\"1\",\"imId\":\"58af556f02a9c1d637a1b37...   \n",
       "36  {\"jobKind\":\"2\",\"imId\":\"c819e8883726ef7e8f669bb...   \n",
       "37  {\"jobKind\":\"1\",\"imId\":\"8bf63188cad28c2c68c56fc...   \n",
       "38  {\"jobKind\":\"1\",\"imId\":\"4a581524b589a252ff86eb5...   \n",
       "39  {\"jobKind\":\"1\",\"imId\":\"7c5495ab4c24aaa96bc971e...   \n",
       "\n",
       "                                             dataInfo  \\\n",
       "0   %7B%22jobKind%22%3A%222%22%2C%22sfrom%22%3A%22...   \n",
       "1   %7B%22jobKind%22%3A%222%22%2C%22sfrom%22%3A%22...   \n",
       "2   %7B%22jobKind%22%3A%222%22%2C%22sfrom%22%3A%22...   \n",
       "3   %7B%22jobKind%22%3A%222%22%2C%22sfrom%22%3A%22...   \n",
       "4   %7B%22jobKind%22%3A%222%22%2C%22sfrom%22%3A%22...   \n",
       "..                                                ...   \n",
       "35  %7B%22jobKind%22%3A%221%22%2C%22d_curPage%22%3...   \n",
       "36  %7B%22jobKind%22%3A%222%22%2C%22d_curPage%22%3...   \n",
       "37  %7B%22jobKind%22%3A%221%22%2C%22d_curPage%22%3...   \n",
       "38  %7B%22jobKind%22%3A%221%22%2C%22d_curPage%22%3...   \n",
       "39  %7B%22jobKind%22%3A%221%22%2C%22d_curPage%22%3...   \n",
       "\n",
       "                                           job.labels  job.advViewFlag  \\\n",
       "0                           [工具产品, 计算机软件, 产品设计, 产品规划]             True   \n",
       "1    [数据产品, 工具产品, 化学化工, 数据分析, 产品规划, 数据挖掘, 用户研究, 产品设计]             True   \n",
       "2                   [策略产品, 能源/水利/环保, 新能源, 产品设计, 产品规划]             True   \n",
       "3                            [数据产品, 数据挖掘, 数据分析, 产品规划]            False   \n",
       "4   [数据产品, 供应链产品, 电子/半导体/集成电路, 电子商务, 产品规划, 用户研究, 市...            False   \n",
       "..                                                ...              ...   \n",
       "35  [智能投顾产品经理, 投资产品, 金融产品, 金融行业, 移动端产品, 需求分析, 用户研究...            False   \n",
       "36                    [to B, IT互联网, 需求分析, 用户研究, 市场调研]            False   \n",
       "37                              [AI大模型产品经理, AI人工智能产品]            False   \n",
       "38  [金融产品, 交易产品, 风控产品, 策略产品, IT互联网, 金融行业, 用户研究, Ax...            False   \n",
       "39                               [OA产品, Axure, Xmind]            False   \n",
       "\n",
       "   job.jobKind  job.dq job.refreshTime  job.salary job.jobId  job.topJob  ...  \\\n",
       "0            2      深圳  20231103162049        薪资面议  60703563        True  ...   \n",
       "1            2  深圳-南山区  20230724093847        薪资面议  60218903        True  ...   \n",
       "2            2  深圳-南山区  20231108085807  15-35k·15薪  62757747        True  ...   \n",
       "3            2      深圳  20210311143004        薪资面议  36908035       False  ...   \n",
       "4            2      深圳  20231016141158  15-20k·15薪  44250585       False  ...   \n",
       "..         ...     ...             ...         ...       ...         ...  ...   \n",
       "35           1      深圳  20231107093631  40-70k·17薪  50129455       False  ...   \n",
       "36           2  深圳-福田区  20221215110638      13-16k  55086205       False  ...   \n",
       "37           1  深圳-南山区  20230908093617      65-95k  49249923       False  ...   \n",
       "38           1      深圳  20230818172441  35-55k·14薪  48734601       False  ...   \n",
       "39           1  深圳-福田区  20230814163016  40-55k·15薪  48592999       False  ...   \n",
       "\n",
       "   recruiter.recruiterTitle             recruiter.recruiterId  \\\n",
       "0                      招聘经理  3fcc5d5e7789cc2d15a835f0d3b0cd8e   \n",
       "1                        HR  682f5224fe72776cffa07540d5a21b09   \n",
       "2                    人力资源经理  a276f1c9428cbbd6482b32c71a5ef883   \n",
       "3                      招聘经理  d4be0c7af21e622076f4668dbe33f725   \n",
       "4                   人力资源部主管  03a35b280d00a67bde30689f01e9fe19   \n",
       "..                      ...                               ...   \n",
       "35                     猎头顾问  851f1364e956ebf8bfae1742a6c2db10   \n",
       "36                       HR  5101bdeab7487e5c1d0a1fdec36fba93   \n",
       "37                     猎头顾问  c8f33d34aac47f5be82800a1d8358940   \n",
       "38                     猎头顾问  4e29b99d4b63b58d7beae86c97c35549   \n",
       "39                     猎头顾问  faa10552e2b9a5c935d11993119cd022   \n",
       "\n",
       "           recruiter.recruiterPhoto comp.compId comp.compScale  \\\n",
       "0   5f8f986779c7cc70efbf36c008u.jpg   8008752.0    5000-10000人   \n",
       "1   5f8f9865ea60860b75384fa508u.jpg   9137518.0       100-499人   \n",
       "2   5f8f9866dfb13a7dee342f1808u.jpg  13559807.0       100-499人   \n",
       "3   57c4e9d345ce9f0a74a9b8cd04a.png   1072424.0       10000人以上   \n",
       "4   5f8f9866dfb13a7dee342f1808u.jpg   8523053.0       500-999人   \n",
       "..                              ...         ...            ...   \n",
       "35  5f9fbc80930a7616c5f26fa107u.jpg         NaN    5000-10000人   \n",
       "36  5f8f986bdfb13a7dee342f2108u.jpg   8635284.0       500-999人   \n",
       "37  6312c4e3e09a8076a83a52d707u.png         NaN       10000人以上   \n",
       "38  62cd222d387f9734984ccc9802u.png         NaN       100-499人   \n",
       "39  62f083ccaa51704ed257569c01u.png         NaN       10000人以上   \n",
       "\n",
       "                      comp.compLogo comp.compIndustry    comp.compName  \\\n",
       "0   6152c4cc6f51835dc0c4098401u.png           房地产开发经营             中海地产   \n",
       "1   5950bce770320c7ee1a5511806a.jpg                银行   前海兴邦金融租赁有限责任公司   \n",
       "2   65127c2197412100f7f75bc008u.png            专业技术服务  中石油深圳新能源研究院有限公司   \n",
       "3   5bfe915474719d35745acf0903a.png               互联网           阿里巴巴集团   \n",
       "4   5bfe9bce74719df0ac9a179703a.png       电子/半导体/集成电路              中电港   \n",
       "..                              ...               ...              ...   \n",
       "35  60e2fe0bf3df194a3c48adb502u.png             计算机软件          知名互联网券商   \n",
       "36  63b4d9f0a0380858a9711da306u.png              IT服务             嘉为科技   \n",
       "37  60e2fe0bf3df194a3c48adb502u.png             计算机软件     某知名计算机软件上市公司   \n",
       "38  60e2fe0bf3df194a3c48adb502u.png              科技金融      某北京科技金融上市公司   \n",
       "39  60e2fe0bf3df194a3c48adb502u.png             批发/零售     某深圳大型批发/零售公司   \n",
       "\n",
       "                                   comp.link  comp.compStage  \n",
       "0    https://www.liepin.com/company/8008752/             NaN  \n",
       "1    https://www.liepin.com/company/9137518/             NaN  \n",
       "2   https://www.liepin.com/company/13559807/             NaN  \n",
       "3    https://www.liepin.com/company/1072424/            港股上市  \n",
       "4    https://www.liepin.com/company/8523053/             NaN  \n",
       "..                                       ...             ...  \n",
       "35                                                        其他  \n",
       "36   https://www.liepin.com/company/8635284/              B轮  \n",
       "37                                                       已上市  \n",
       "38                                                       已上市  \n",
       "39                                                     不需要融资  \n",
       "\n",
       "[400 rows x 31 columns]>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "产品经理_深圳_results.to_html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['dataParams', 'dataInfo', 'job.labels', 'job.advViewFlag',\n",
       "       'job.jobKind', 'job.dq', 'job.refreshTime', 'job.salary', 'job.jobId',\n",
       "       'job.topJob', 'job.title', 'job.pcOuterLink', 'job.h5OuterLink',\n",
       "       'job.requireWorkYears', 'job.requireEduLevel', 'job.link',\n",
       "       'job.dataPromId', 'recruiter.imId', 'recruiter.imUserType',\n",
       "       'recruiter.chatted', 'recruiter.recruiterName',\n",
       "       'recruiter.recruiterTitle', 'recruiter.recruiterId',\n",
       "       'recruiter.recruiterPhoto', 'comp.compId', 'comp.compScale',\n",
       "       'comp.compLogo', 'comp.compIndustry', 'comp.compName', 'comp.link',\n",
       "       'comp.compStage'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "产品经理_深圳_results.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "深圳        125\n",
       "深圳-南山区    115\n",
       "深圳-福田区     54\n",
       "深圳-宝安区     38\n",
       "深圳-龙华区     35\n",
       "深圳-龙岗区     19\n",
       "深圳-盐田区      4\n",
       "深圳-罗湖区      4\n",
       "深圳-坪山区      3\n",
       "深圳-光明区      3\n",
       "Name: job.dq, dtype: int64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq = 产品经理_深圳_results['job.dq'].value_counts()\n",
    "series_dq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['深圳-南山区',\n",
       " '深圳-福田区',\n",
       " '深圳-宝安区',\n",
       " '深圳-龙华区',\n",
       " '深圳-龙岗区',\n",
       " '深圳-盐田区',\n",
       " '深圳-罗湖区',\n",
       " '深圳-坪山区',\n",
       " '深圳-光明区']"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dq_name= [i for i in series_dq.index if '-' in i]\n",
    "dq_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([115,  54,  38,  35,  19,   4,   4,   3,   3], dtype=int64)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq[dq_name].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting pyecharts\n",
      "  Downloading pyecharts-2.0.4-py3-none-any.whl (147 kB)\n",
      "Requirement already satisfied: jinja2 in c:\\program files\\anaconda3\\lib\\site-packages (from pyecharts) (2.11.2)\n",
      "Collecting simplejson\n",
      "  Downloading simplejson-3.19.2-cp38-cp38-win_amd64.whl (75 kB)\n",
      "Collecting prettytable\n",
      "  Downloading prettytable-3.9.0-py3-none-any.whl (27 kB)\n",
      "Requirement already satisfied: MarkupSafe>=0.23 in c:\\program files\\anaconda3\\lib\\site-packages (from jinja2->pyecharts) (1.1.1)\n",
      "Requirement already satisfied: wcwidth in c:\\program files\\anaconda3\\lib\\site-packages (from prettytable->pyecharts) (0.2.5)\n",
      "Installing collected packages: simplejson, prettytable, pyecharts\n",
      "Successfully installed prettytable-3.9.0 pyecharts-2.0.4 simplejson-3.19.2\n"
     ]
    }
   ],
   "source": [
    "!pip install pyecharts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'pyecharts'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-11-f0e75a2031be>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mpyecharts\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0moptions\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mopts\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      2\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mpyecharts\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcharts\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mMap\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mpyecharts\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfaker\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mFaker\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'pyecharts'"
     ]
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "[i.split('-')[1] for i in dq_name]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[115, 54, 38, 35, 19, 4, 4, 3, 3]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq[dq_name].values.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min', '深圳':'https://assets.pyecharts.org/assets/v5/maps/guang3_dong1_shen1_zhen4'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"9e62d4f14fac4e3484c4dcd1b2fedc14\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '深圳'], function(echarts) {\n",
       "                var chart_9e62d4f14fac4e3484c4dcd1b2fedc14 = echarts.init(\n",
       "                    document.getElementById('9e62d4f14fac4e3484c4dcd1b2fedc14'), 'white', {renderer: 'canvas'});\n",
       "                var option_9e62d4f14fac4e3484c4dcd1b2fedc14 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#5470c6\",\n",
       "        \"#91cc75\",\n",
       "        \"#fac858\",\n",
       "        \"#ee6666\",\n",
       "        \"#73c0de\",\n",
       "        \"#3ba272\",\n",
       "        \"#fc8452\",\n",
       "        \"#9a60b4\",\n",
       "        \"#ea7ccc\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u4ea7\\u54c1\\u7ecf\\u7406\\u5730\\u533a\\u5206\\u5e03\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"map\": \"\\u6df1\\u5733\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u5c71\\u533a\",\n",
       "                    \"value\": 350\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u7530\\u533a\",\n",
       "                    \"value\": 106\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b9d\\u5b89\\u533a\",\n",
       "                    \"value\": 52\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9f99\\u534e\\u533a\",\n",
       "                    \"value\": 40\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9f99\\u5c97\\u533a\",\n",
       "                    \"value\": 36\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5149\\u660e\\u533a\",\n",
       "                    \"value\": 12\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7f57\\u6e56\\u533a\",\n",
       "                    \"value\": 11\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u576a\\u5c71\\u533a\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u76d0\\u7530\\u533a\",\n",
       "                    \"value\": 2\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"aspectScale\": 0.75,\n",
       "            \"nameProperty\": \"name\",\n",
       "            \"selectedMode\": false,\n",
       "            \"zoom\": 1,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"mapValueCalculation\": \"sum\",\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4ea7\\u54c1\\u7ecf\\u7406\\u5730\\u533a\\u5206\\u5e03\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1,\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"Map-\\u6df1\\u5733-\\u4ea7\\u54c1\\u7ecf\\u7406\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"hoverLink\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"padding\": 5,\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_9e62d4f14fac4e3484c4dcd1b2fedc14.setOption(option_9e62d4f14fac4e3484c4dcd1b2fedc14);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0xbb94af0>"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "\n",
    "c = (\n",
    "    Map()\n",
    "    .add(\"产品经理地区分布\", [list(z) for z in zip([i.split('-')[1] for i in dq_name],series_dq[dq_name].values.tolist())], \"深圳\")\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"Map-深圳-产品经理\"), visualmap_opts=opts.VisualMapOpts()\n",
    "    )\n",
    "    \n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
